@*Hdip Project 2013-14, Student Name:- Chris Pembroke,  Student Number:- x00115839*@
@model Exercise1Project.Models.BikeService

@{
    ViewBag.Title = "Edit";
}

<div class="viewContainerDiv2">

    <h2>Edit Service</h2>

    <p>
        @Html.DropDownList("Items")&nbsp&nbsp
        @Html.DropDownList("Actions")
        &nbsp&nbsp&nbsp<button onclick="AddListItem()">ADD</button>
    </p>

    <div>
        @Html.LabelFor(model => model.SelectedItems, new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.DropDownList("ServiceItems")
            &nbsp&nbsp&nbsp<button onclick="return RemoveListItem();">REMOVE</button>

        </div>
    </div>

    @using (Html.BeginForm())
    {
        @Html.AntiForgeryToken()

        <div class="form-horizontal">

            @Html.ValidationSummary(true)
            @Html.HiddenFor(model => model.ServiceID)
            @Html.HiddenFor(model => model.BikeID)
            @Html.HiddenFor(model => model.LabourCost)
            @Html.HiddenFor(model => model.PartsCost)
            @Html.HiddenFor(model => model.QuotedPrice)
            @Html.HiddenFor(model => model.TotalPrice)

            <div class="form-group">
                <div class="col-md-10">
                    @Html.HiddenFor(model => model.SelectedItems)
                    @Html.ValidationMessageFor(model => model.SelectedItems)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.Date, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.TextBoxFor(model => model.Date, new { @class = "date-picker", @readonly = "readonly" })
                    @Html.ValidationMessageFor(model => model.Date)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.StatusBikeInShop, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.DropDownList("StatusBikeInShop")
                    @Html.ValidationMessageFor(model => model.StatusBikeInShop)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.StatusService, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.DropDownList("StatusService")
                    @Html.ValidationMessageFor(model => model.StatusService)
                </div>
            </div>

            <div class="form-group">
                <div class="col-md-offset-2 col-md-10">
                    <input type="submit" value="Save" class="btn btn-default" />
                </div>
            </div>
        </div>
    }

    <div>
        @Html.ActionLink("Back to Service List", "ServiceList", new { id = Model.BikeID })
    </div>

</div>

    @section Scripts {
        @Scripts.Render("~/bundles/jqueryval")
        <link href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />
        <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
        <script src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
        <script type="text/javascript" src="@Url.Content("/Scripts/bikeservicesEdit.js")"></script>
        <link rel="stylesheet" href="@Url.Content("~/Content/customised.css")" />
    }
